import { createRouter, createWebHistory } from 'vue-router'
import LayoutView from "@/layout/LayoutView.vue";
import CategoryListView from "@/views/CategoryListView.vue";
import DashboardView from "@/views/DashboardView.vue";
import TaskListView from "@/views/TaskListView.vue";
// 导入TaskListViewByPage组件
import TaskListViewByPage from "@/views/TaskListViewByPage.vue";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'layout',
      component: LayoutView,
      children:[
        {
          path: '/categoryList',
          name:'categoryList',
          component:CategoryListView
        },
        {
          path:'/dashboard',
          name:'dashboard',
          component:DashboardView
        },
        {
          path:'/taskList',
          name:'taskList',
          component:TaskListView
        },
        // 添加分页任务列表的路由配置
        {
          path: '/taskListByPage',
          name: 'taskListByPage',
          component: TaskListViewByPage
        }
      ]
    }
  ]
})

export default router